This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
I think most of what you are asking to do can be accomplished using our Notes Java UI APIs. You should reference the Javadoc in the 8.5.1 help. In Notes go to Help -> Help Contents-> Client APIs for Lotus Notes and Domino Designer - Javadoc -> Notes Client Java UI APIs. Here you will find several APIs which help plugin developers to consume and alter Notes data. Your plugin will have to depend on com.ibm.notes.java.ui and com.ibm.notes.java.api. Most of the functionality in these APIs originate from NotesUIWorkspace. To solve your questions you probably want to use NotesUIWorkspace.getCurrentDocument(). This will give you the current document that is showing, either in the UI as its own tab, or being displayed in the preview pane. This method returns a NotesUIDocument which has several methods but the two I think you are interested in are getSelectedText() and getField(fieldName)/getFields().
In your right click menu you probably don't want to bother with the IStructuredSelection, instead you want to call NotesUIWorkspace.getCurrentDocument().getSelectedText().
For you second problem what do you mean when you say "focus changed"? Are you referring to changing your selection in your inbox view, or changing focus by switching tabs? There is no supported way to pull data from view entries in your inbox. If you are talking about switching focus between open documents in tabs or the open document in the preview pane than getting the current document as I explained above and calling getField(fieldName) will work. You can determine the fields in any document by opening the properties dialog for that document. You can do this by going to File -> Properties while the document is open and going to the second tab (Design Tab) in the resulting dialog. There you will see a list of fields. This is not so easy to understand if the document has a lot of fields. If you have Domino Designer installed I would suggest opening the form used to create the document and looking at the fields that way. For example an email in your inbox is created with a form called Memo. A reply document is created with a form called Reply. Open any mail database in Domino Designer and look for those forms under the Forms section to find the available fields in the document. I hope this helps. Please let me know if you need more help.
-Ryan
Feedback response number WEBB7YTT8Q created by ~Wei Rejipybergflar on 12/17/2009